﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="frmMensagem.aspx.cs" Inherits="Sinacor.Tools.Web.ConstantesErro.frmMensagem" EnableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Cadastro de mensagens</title>
    <link href="Estilos.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="pragma" content="no-cache" />   
        
    <script type="text/javascript">
        
        function ValorSubModulo()
        {
            document.getElementById('txtSubmodulo2').value = document.getElementById('ddlSubModulo').value;        
        }
        
         function ConfirmarDelete()
        {
         if(confirm('Confirma exclusão?'))
            return true;
         else
            return false;   
        }
        
        function showDelete(pObjTR)
        {
            //debugger;
            
                pObjTR.childNodes[8].childNodes[0].style.display = 'block'
        }
        
        function doisCliques(pObjTR, campoDestino)
        {
            
            if (event.ctrlKey) showDelete(pObjTR);
            //debugger;
            if (window.opener != null)
            {
                if (window.opener.closed)
                {
                    alert('A Janela pai foi fechada, esta janela também será!');
                    window.close();
                }
                
                //alert('Debug : ExceptionMessage');
                
//                if(pObjTR.childNodes[7].innerText != 'ExceptionMessage')
//                {
//                    alert('Somente mensagens do tipo (ExceptionMessage) podem ser associadas a uma Exceção.');
//                    return false;
//                }
                
                window.opener.document.getElementById('hdnCodigoMensagemVinculada').value = pObjTR.childNodes[0].innerText;             
                window.opener.document.getElementById('txtCodigoMensagemVinculada').value = pObjTR.childNodes[0].innerText;             
                window.opener.document.getElementById('txtResourceKey').value = pObjTR.childNodes[17].innerText.substring(pObjTR.childNodes[17].innerText.lastIndexOf('.')+1);
                window.opener.document.getElementById('txtPrefixoResourceKey').value = pObjTR.childNodes[17].innerText.substring(0, pObjTR.childNodes[17].innerText.lastIndexOf('.'));
                window.close();
            }      
            acaoSalvar(false);      
        }
        
        //incluido - debug - esertorio - 200809261220
        function onClick_Deletar()
        {
            //debug
            if(confirm('Confirma exclusão ?')!=true)
            {
                //debug
                alert('Exclusão confirmada.');
            }
        }
        
        function setViewerItem(pObjTR, show)
        {
            /*
             0-Id
             1-Modulo
             2-Submodulo
             3-ResourceKey
             4-DescricaoMensagem
             5-Proposito
             6-DescricaoStatus
             7-DescricaoTipo
             8-botãoDeletar
             9-CodigoStatus
            10-CodigoTipo
            11-CodigoStatusTraducao
            12-CodigoIdioma
            */
   
            
            document.getElementById('txtCodigo2').value = pObjTR.childNodes[0].innerText;
            document.getElementById('hdnCodigo2').value = pObjTR.childNodes[0].innerText;
            document.getElementById('txtModulo2').value = pObjTR.childNodes[1].innerText;
            document.getElementById('txtSubmodulo2').value = pObjTR.childNodes[2].innerText;
            
            document.getElementById('txtResourceKey2').value = pObjTR.childNodes[17].innerText.substring(pObjTR.childNodes[17].innerText.lastIndexOf('.')+1);
            document.getElementById('txtPrefixoResourceKey2').value = pObjTR.childNodes[17].innerText.substring(0, pObjTR.childNodes[17].innerText.lastIndexOf('.'));
            
            document.getElementById('txtDescricaoTipo2').value = pObjTR.childNodes[7].innerText;
            document.getElementById('txtDescricaoStatus2').value = pObjTR.childNodes[6].innerText;
            
            document.getElementById('txtStatusTraducao2').value = pObjTR.childNodes[13].innerText;
            
            
            document.getElementById('txtIdioma2').value = pObjTR.childNodes[14].innerText;
            document.getElementById('txtProposito2').value = pObjTR.childNodes[16].innerText;
            document.getElementById('txtMensagem2').value = pObjTR.childNodes[15].innerText;
            
            //debugger;
            var div = document.getElementById('divDetalhes');
            var iframe = document.getElementById('iframeDiv');
            //debugger;                       
            div.style.top = 0;
            div.style.left  = 0;
            iframe.style.top = div.style.top;
            iframe.style.left = div.style.left;
            
            div.style.display = (show ? 'block' : 'none');
            iframe.style.display = (show ? 'block' : 'none');
            
            //StatusExceptionMessage();
        }
        
//        function ControleExceptionMessage(pObjTR)
//        {
//         var exceptionMessage = document.getElementById('chkExceptionMessage');
//                
//         if(pObjTR.childNodes[10].innerText == '3')
//            exceptionMessage.disabled = "";                
//         else
//            exceptionMessage.disabled = "disabled";
//          
//        }
//        function StatusExceptionMessage()
//        {
//        var exceptionMessage = document.getElementById('chkExceptionMessage');
//        //Message
//         if(document.getElementById('ddlTipoMensagem').value == '3')
//            exceptionMessage.disabled = "";                
//         else
//            exceptionMessage.disabled = "disabled";
//        }
        
       
        function setUpdateItem(pObjTR)
        {
            /*
            Id
            Modulo
            Submodulo
            ResourceKey
            DescricaoMensagem
            Proposito
            DescricaoStatus
            DescricaoTipo
            botãoDeletar
            CodigoStatus
            CodigoTipo
            CodigoStatusTraducao
            CodigoIdioma
            */
            document.getElementById('hdnOperacao').value = 'a'; //determinar operação de alteração - npaulo/esertorio - 20080919
            document.getElementById('txtCodigo').value = pObjTR.childNodes[0].innerText;
            document.getElementById('hdnCodigo').value = pObjTR.childNodes[0].innerText;
            document.getElementById('ddlStatusMensagem').value = pObjTR.childNodes[9].innerText;
            
            document.getElementById('ddlModulo').value = pObjTR.childNodes[1].innerText;
            
            //document.getElementById('txtSubmodulo').value = pObjTR.childNodes[2].innerText; //exc - esertorio - 200810061254
            document.getElementById('ddlSubModulo').value = pObjTR.childNodes[2].innerText;
            document.getElementById('txtSubmodulo2').value = document.getElementById('ddlSubModulo').value;
            
//            var objDdlSubModulo = document.getElementById('ddlSubModulo');
//            var achou = false;
//            for(var i = 0; i < objDdlSubModulo.options.length; i++)
//            {
//                if(objDdlSubModulo.options[i].text == pObjTR.childNodes[2].innerText)
//                {
//                    achou = true;
//                    //alert('achou = true'); //debug
//                    document.getElementById('ddlSubModulo').value = pObjTR.childNodes[2].innerText;
//                    document.getElementById('txtSubmodulo2').value = document.getElementById('ddlSubModulo').value;
//                    
//                    break;
//                }
//            }
//            if(!achou)
//            {
//                //alert('achou = false'); //debug
//                objDdlSubModulo.options[0] = new Option( pObjTR.childNodes[2].innerText, pObjTR.childNodes[2].innerText);
//                objDdlSubModulo.options[0].selected = true;
//            }
            
            //document.getElementById('ddlSubModulo').value = pObjTR.childNodes[2].innerText; //inc - esertorio - 200810061254
            
            document.getElementById('ddlTipoMensagem').value = pObjTR.childNodes[10].innerText;
            
            document.getElementById('hdnResourKeyCompleta').value = pObjTR.childNodes[17].innerText;
            document.getElementById('txtResourceKey').value = pObjTR.childNodes[17].innerText.substring(pObjTR.childNodes[17].innerText.lastIndexOf('.')+1);
            document.getElementById('txtPrefixoResourceKey').value = pObjTR.childNodes[17].innerText.substring(0, pObjTR.childNodes[17].innerText.lastIndexOf('.'));
            
            document.getElementById('txtProposito').value = pObjTR.childNodes[16].innerText;
            document.getElementById('txtMensagem').value = pObjTR.childNodes[15].innerText;
            
            //document.getElementById('lblStatusTraducao').style.display = 'block';
            //document.getElementById('lblIdioma').style.display = 'block';
            //document.getElementById('ddlStatusTraducao').style.display = 'block';
            //document.getElementById('ddlIdioma').style.display = 'block';
            document.getElementById('ddlStatusTraducao').value = pObjTR.childNodes[11].innerText;
            document.getElementById('ddlIdioma').value = pObjTR.childNodes[12].innerText;

           //StatusExceptionMessage();
            
            acaoSalvar(false);

        }
        function acaoSalvar(status)
        {
           frmMensagem.btnSalvar.disabled = status;
           frmMensagem.btnCancelar.disabled = status;
        }
        function resetarForm()
        {
            document.getElementById('hdnOperacao').value = 'i'; //determinar operação de inclusao - npaulo/esertorio - 20080919
            document.getElementById('txtCodigo').value = '';
            document.getElementById('hdnCodigo').value = '';
            document.getElementById('ddlStatusMensagem').value = '';
            document.getElementById('ddlModulo').value = '';
            //document.getElementById('txtSubmodulo').value = ''; //exc - esertorio - 200810061255
            document.getElementById('ddlSubModulo').value = ''; //inc - esertorio - 200810061255
            document.getElementById('ddlTipoMensagem').value = '';
            document.getElementById('hdnResourKeyCompleta').value = '';
            document.getElementById('txtResourceKey').value = '';
            document.getElementById('txtPrefixoResourceKey').value = '';            
            document.getElementById('txtProposito').value = '';
            document.getElementById('txtMensagem').value = '';
            document.getElementById('ddlStatusTraducao').style.display = 'none';
            document.getElementById('ddlIdioma').style.display = 'none';
            document.getElementById('lblStatusTraducao').style.display = 'none';
            document.getElementById('lblIdioma').style.display = 'none';
            document.getElementById('ddlStatusTraducao').value = '';
            document.getElementById('ddlIdioma').value = '';
            
            //var exceptionMessage = document.getElementById('chkExceptionMessage');
            //exceptionMessage.disabled = "disabled";                      
        }
        
        function validaCamposObrigatorios()
        {
            var msg = '';
           
            if (document.getElementById('ddlStatusMensagem').value.replace(/^\s+|\s+$/g, '') == '')
            {
                msg +=  'Selecione o status da mensagem!\n';            
            }
            
            if (document.getElementById('ddlModulo').value.replace(/^\s+|\s+$/g, '') == '')
            {
                msg +=  'Selecione o modulo da mensagem!\n';
            }
            
            if (document.getElementById('ddlModulo').value != 'Common') 
            {
                //if (document.getElementById('txtSubmodulo').value.replace(/^\s+|\s+$/g, '') == '') //exc - esertorio - 200810061257
                //{
                //    msg +=  'Insira o submódulo da mensagem!\n';
                //}
                if (document.getElementById('ddlSubModulo').value.replace(/^\s+|\s+$/g, '') == '') //inc - esertorio - 200810061257
                {
                    msg +=  'Insira o sub-módulo da mensagem!\n';
                }
            }
            
            if (document.getElementById('ddlTipoMensagem').value.replace(/^\s+|\s+$/g, '') == '')
            {
                msg +=  'Selecione o tipo de mensagem!\n';            
            }
            
            if (document.getElementById('txtResourceKey').value.replace(/^\s+|\s+$/g, '') == '')
            {
                msg +=  'Selecione o resource key da mensagem!\n';            
            }
            
            if (document.getElementById('txtProposito').value.replace(/^\s+|\s+$/g, '') == '')
            {
                msg +=  'Insira o propósito da mensagem!\n';
            }
            
            if (document.getElementById('txtMensagem').value.replace(/^\s+|\s+$/g, '') == '')
            {
                msg +=  'Insira a descrição da mensagem!\n';            
            }
            
            if (msg != '')
            {
                alert(msg);
                return false;
            }
            
            return true;            
        }
       
        function validaCamposObrigatoriosMensagem()
        {
            var msg = '';
                                   
            if (document.getElementById('txtMensagem').value.replace(/^\s+|\s+$/g, '') == '')
            {
                msg =  'Insira a descrição da mensagem!\n';            
            }
            
            if (msg != '')
            {
                alert(msg);
                return false;
            }
            
            return true;            
        }
        
        function setarResource()
        {
            var podeSetarResource = false;
            document.getElementById('hdnResourKeyCompleta').value = '';
            if (document.getElementById('ddlModulo').value != 'Common') 
            {
                podeSetarResource = ((document.getElementById('ddlModulo').value.replace(/^\s+|\s+$/g, '') != '') &&
                                    //(document.getElementById('txtSubmodulo').value.replace(/^\s+|\s+$/g, '') != '') &&  //exc - esertorio - 200810061257
                                    (document.getElementById('ddlSubModulo').value.replace(/^\s+|\s+$/g, '') != '') &&  //inc - esertorio - 200810061257
                                    (document.getElementById('ddlTipoMensagem').value.replace(/^\s+|\s+$/g, '') != '') &&
                                    (document.getElementById('txtResourceKey').value.replace(/^\s+|\s+$/g, '') != ''));
                
                if (podeSetarResource)
                {
                    document.getElementById('hdnResourKeyCompleta').value = 
                        document.getElementById('ddlModulo')[document.getElementById('ddlModulo').selectedIndex].text 
                        + '.'  
                        //+ document.getElementById('txtSubmodulo').value  //exc - esertorio - 200810061257
                        + document.getElementById('ddlSubModulo')[document.getElementById('ddlSubModulo').selectedIndex].text   //inc - esertorio - 200810061257
                        + '.' 
                        + document.getElementById('ddlTipoMensagem')[document.getElementById('ddlTipoMensagem').selectedIndex].text 
                        + '.' 
                        + document.getElementById('txtResourceKey').value;
                    
                    document.getElementById('txtPrefixoResourceKey').value = document.getElementById('hdnResourKeyCompleta').value;
                }
            }
            else
            {
                podeSetarResource = ((document.getElementById('ddlModulo').value.replace(/^\s+|\s+$/g, '') != '') &&
                                    (document.getElementById('ddlTipoMensagem').value.replace(/^\s+|\s+$/g, '') != '') &&
                                    (document.getElementById('txtResourceKey').value.replace(/^\s+|\s+$/g, '') != ''));
                                    
                if (podeSetarResource)
                {
                                        
                    
                    document.getElementById('hdnResourKeyCompleta').value = 
                        document.getElementById('ddlModulo')[document.getElementById('ddlModulo').selectedIndex].text 
                        + '.' 
                        + document.getElementById('ddlTipoMensagem')[document.getElementById('ddlTipoMensagem').selectedIndex].text 
                        + '.' 
                        + document.getElementById('txtResourceKey').value;
                    
                    document.getElementById('txtPrefixoResourceKey').value =
                        document.getElementById('ddlModulo')[document.getElementById('ddlModulo').selectedIndex].text 
                        + '.' 
                        + document.getElementById('ddlTipoMensagem')[document.getElementById('ddlTipoMensagem').selectedIndex].text;
                }
            }
            //StatusExceptionMessage();   
        }
        
        function MensagemSalvaComSucesso()
        {
            window.alert("Mensagem salva com sucesso.");
        }
        
        function MensagemException(idMensagem, idResourceKey)
        {
            window.alert("O Código da Mensagem \"" + idMensagem + "\" e o Código do Texto \"" + idResourceKey + "\" foram salvos com sucesso.");
        }
        

    </script>
</head>
<body style="width: 100%; height: 100%; margin: 0 0 0 0;">
    <form id="frmMensagem" runat="server"  style="width: 100%; height: 100%; margin: 0 0 0 0; ">
        <table style="width: 100%;" cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td style="width: 100%; " align="center">
                    <fieldset>
                        <legend><asp:Label ID="Label1" runat="server">Inclusão/Alteração de Mensagem</asp:Label></legend>
                        <table style="width: 100%; height: 175px" cellpadding="0" cellspacing="0" border="0">
                            <tr>
                                <td style="width: 10%;" align="center">Código</td>
                                <!-- alterado ID="txtCodigo" propriedade Enabled de "false" para "true" - esertorio - 200809222036 -->
                                <!-- //incluido campo hdnOperacao - npaulo/esertorio - 20080919-->
                                <td style="width: 20%;" colspan="2" align="left">
                                	<asp:TextBox ID="txtCodigo" runat="server" Enabled="true" Width="90%"></asp:TextBox>
                                	<input type="hidden" id="hdnOperacao" runat="server" value="i" />
                                	<input id="hdnCodigo" type="hidden" runat="server" />                                	
                                	<input id="hdnCodigoTextoMensagem" type="hidden" runat="server" />
                                	<input id="hdnTipoFiltroMensagem" type="hidden" runat="server" />
                                </td>
                                <td style="width: 10%;">&nbsp;</td>
                                <td style="width: 30%;">&nbsp;</td>
                                <td style="width: 10%;">&nbsp;</td>
                                <td style="width: 20%;" align="center">&nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 10%;" align="center">Tipo Mensagem</td>
                                <td style="width: 20%;" colspan="2"><asp:DropDownList ID="ddlTipoMensagem" 
                                        runat="server" DataTextField="Descricao" DataValueField="Id" Width="100%" 
                                        AutoPostBack="False"></asp:DropDownList></td><!--onselectedindexchanged="ddlTipoMensagem_SelectedIndexChanged"  -->
                                <td style="width: 10%;" align="center">Status Mensagem</td>
                                <td style="width: 30%;">&nbsp;<asp:DropDownList ID="ddlStatusMensagem" runat="server" Width="50%"></asp:DropDownList></td>
                                <td style="width: 10%;">
                                    <asp:Label ID="lblStatusTraducao" runat="server" Text="Status Tradução"></asp:Label>
                                </td>
                                <td style="width: 20%;" align="center">
                                    <asp:DropDownList ID="ddlStatusTraducao" runat="server" Width="100%">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 10%;" align="center">Módulo</td>
                                <td style="width: 10%;" colspan="2">
                                    <asp:DropDownList ID="ddlModulo" runat="server" Width="100%" OnSelectedIndexChanged="ddlModulo_SelectedIndexChanged" AutoPostBack="true">
                                    </asp:DropDownList>
                                </td>
                                <td style="width: 10%;">Submódulo</td>
                                <td style="width: 30%;" align="left">&nbsp;
                                    <asp:DropDownList ID="ddlSubModulo" runat="server" Width="50%">
                                    </asp:DropDownList>
                                </td>
                                <td style="width: 10%;">
                                    <asp:Label ID="lblIdioma" runat="server" Text="Idioma"></asp:Label>
                                </td>
                                <td style="width: 20%;" align="center">
                                    <asp:DropDownList ID="ddlIdioma" runat="server" Width="100%">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="7" style="width: 20%;" >
                                    <table cellpadding="0" cellspacing="0" style="width: 100%;">
                                        <tr>
                                            <td style="width: 10%;">Resource Key</td>
                                            <td style="width: 20%;">
                                                <asp:TextBox ID="txtPrefixoResourceKey" runat="server" Width="90%" Enabled="false" ></asp:TextBox>
                                                <input type="hidden" runat="server" id="hdnResourKeyCompleta" />
                                            </td>
                                            <td style="width: 20%;">
                                                <asp:TextBox ID="txtResourceKey" runat="server" Width="90%"></asp:TextBox>
                                            </td>
                                            <td style="width: 50%;">&nbsp;</td>
                                        </tr>
                                    </table>
                                
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
            <tr>
                <td style="width: 100%;" align="center">
                    <fieldset>
                        <legend>Propósito</legend>
                        <table style="width: 100%;">
                            <tr align="center">
                                <!-- alterado (width) de 33 para 10 - esertorio - 200809191922 -->
                                <td style="width: 10%;">&nbsp;</td>
                                <!-- alterado (width) de 34 para 80 - esertorio - 200809191922 -->
                                <td style="width: 80%;">
                                    <!-- alterado (MaxLength) de 255 para 1000 - esertorio - 200809191922 -->
                                    <!-- alterado (Columns) de 50 para 100 - esertorio - 200809191922 -->
                                    <asp:TextBox MaxLength="1000" TextMode="MultiLine"  Columns="100" Rows="6" ID="txtProposito" runat="server"></asp:TextBox>
                                </td>
                                <td style="width: 10%;">&nbsp;</td> <!-- alterado (width) de 33 para 10 - esertorio - 200809191922 -->
                            </tr>
                        </table>
                    </fieldset>
                </td>               
            </tr>
            <tr>
                <td style="width: 100%;" align="center">
                    <fieldset>
                        <legend>Mensagem</legend>
                        <table style="width: 100%;">
                            <tr align="center">
                                <td style="width: 33%;">&nbsp;</td>
                                <td style="width: 34%;"><asp:TextBox MaxLength="255" TextMode="MultiLine"  Columns="50" Rows="6" ID="txtMensagem" runat="server"></asp:TextBox></td>
                                <td style="width: 33%;">&nbsp;</td>
                            </tr>
                        </table>
                    </fieldset>
                </td>               
            </tr>
            <tr>
                <td style="width: 100%;" align="center">
                    <table style="width: 100%;">
                        <tr align="center">
                            <%--<td style="width: 5%;" align="left"><nobr><input id="chkExceptionMessage" name="chkExceptionMessage" type="checkbox" runat="server" value="" disabled="disabled"/>ExceptionMessage</nobr></td>--%>
                            <td style="width: 80%;" align="center">&nbsp;</td>
                            <td style="width: 5%;" align="center"><asp:Button ID="btnNovo" runat="server" Text="Nova Pesquisa" style="height: 26px" onclick="btnNovo_Click" /></td>                            
                            <td style="width: 5%;" align="center"><asp:Button ID="btnPesquisar" runat="server" Text="Pesquisar" onclick="btnPesquisar_Click" /></td>
                            <td style="width: 5%;" align="center"><asp:Button ID="btnSalvar" runat="server" Text="Salvar"  onclick="btnSalvar_Click" style="height: 26px" Enabled ="false" /></td>
                            <td style="width: 5%;" align="center"><asp:Button ID="btnCancelar" runat="server" Text="Cancelar" OnClick ="btnCancelar_Click" /></td>
                            
                        </tr>
                    </table>
                </td>               
            </tr>
<%--            <tr >
                <td style="width: 100%;" align="center">
                    Para incluir uma mensagem clique em novo, para visualizar os detalhes dos itens pesquisados passe o mouse sobre os itens do grid, para alterar
                    selecione clique no item do grid. 
                </td>
            </tr>--%>
            <tr>
                <td style="width: 100%;">
                    <fieldset>
                        <legend>Dados Cadastrados</legend>
                        <asp:GridView ID="grdTipoMensagem" runat="server" AutoGenerateColumns="False" 
                                Width="100%" AllowPaging="True" AllowSorting="True" 
                                onpageindexchanging="grdTipoMensagem_PageIndexChanging" 
                                onsorting="grdTipoMensagem_Sorting" 
                                onrowdatabound="grdTipoMensagem_RowDataBound" BorderColor="Black">
                                <PagerSettings Mode="Numeric" Position="Bottom" PageButtonCount="30"/>
                                <Columns>
                                    <asp:BoundField DataField="Id" HeaderText="Código" SortExpression="Id" >
                                        <HeaderStyle Width="10%" />
                                        <ItemStyle Width="10%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Modulo" HeaderText="Módulo" SortExpression="Modulo" >
                                        <HeaderStyle Width="10%" />
                                        <ItemStyle Width="10%" />                                    
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Submodulo" HeaderText="Submódulo" SortExpression="Submodulo" >
                                        <HeaderStyle Width="10%" />
                                        <ItemStyle Width="10%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ResourceKey" HeaderText="Resource Key" SortExpression="ResourceKey" >
                                        <HeaderStyle Width="10%" />
                                        <ItemStyle Width="10%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DescricaoMensagem" HeaderText="Descricao Mensagem" SortExpression="DescricaoMensagem" >
                                        <HeaderStyle Width="40%" />
                                        <ItemStyle Width="40%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Proposito" HeaderText="Proposito da Mensagem" SortExpression="Proposito" >
                                        <HeaderStyle Width="20%" CssClass="COLUNA_ESCONDIDA" />
                                        <ItemStyle Width="20%" CssClass="COLUNA_ESCONDIDA" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DescricaoStatus" HeaderText="DescricaoStatus" SortExpression="DescricaoStatus" >
                                        <HeaderStyle Width="10%" />
                                        <ItemStyle Width="10%" />                                    
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DescricaoTipo" HeaderText="DescricaoTipo" SortExpression="DescricaoTipo" >
                                        <HeaderStyle Width="10%" />
                                        <ItemStyle Width="10%" />                                    
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="Deletar">
                                        <ItemTemplate><asp:ImageButton runat="server" ID="Deletar" ImageUrl="~/Imagens/delete.gif" OnClientClick="if(!ConfirmarDelete()){ return false;}"  onclick="Deletar_Click" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Id")%>' />
                                        </ItemTemplate>
                                        <HeaderStyle Width="10%" />
                                        <ItemStyle Width="10%" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="CodigoStatus" HeaderText="Codigo Status" SortExpression="CodigoStatus" >
                                        <HeaderStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                        <ItemStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CodigoTipo" HeaderText="Codigo Tipo" SortExpression="CodigoTipo" >
                                        <HeaderStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                        <ItemStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />                                    
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CodigoStatusTraducao" HeaderText="Codigo Status Tradução" SortExpression="CodigoStatusTraducao" >
                                        <HeaderStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                        <ItemStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />                                    
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CodigoIdioma" HeaderText="Codigo Idioma" SortExpression="CodigoIdioma" >
                                        <HeaderStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                        <ItemStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />                                    
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DescricaoStatusTraducao" HeaderText="Descricao Status Traducao" SortExpression="CodigoStatusTraducao" >
                                        <HeaderStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                        <ItemStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DescricaoIdioma" HeaderText="Descricao Idioma" SortExpression="CodigoIdioma" >
                                        <HeaderStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                        <ItemStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />                                    
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DescricaoMensagem" HeaderText="Descricao Mensagem" SortExpression="DescricaoMensagem" >
                                        <HeaderStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                        <ItemStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Proposito" HeaderText="Proposito da Mensagem" SortExpression="Proposito" >
                                        <HeaderStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                        <ItemStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ResourceKey" HeaderText="Resource Key" SortExpression="ResourceKey" >
                                        <HeaderStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                        <ItemStyle Width="10%" CssClass="COLUNA_ESCONDIDA" />
                                    </asp:BoundField>
                                </Columns>
                                <PagerStyle BackColor="#F0F0F0" />
                                <HeaderStyle BackColor="#F0F0F0" />
                        </asp:GridView>
                    </fieldset>
                </td>
            </tr>
            <tr>
                <td style="width: 100%; ">&nbsp;
                    <div  id="divDetalhes" style="width: 100%; height: 200px; position: absolute; display: none; margin: 0 0 0 0; background-color: white; z-index: 99; ">
                        <table cellspacing="0" cellpadding="0" style="width: 100%; height: 100%; margin: 0 0 0 0;">
                            <tr>
                                <td style="width: 100%; " align="center">
                                    <fieldset>
                                        <legend><asp:Label ID="Label2" runat="server">Dados da Mensagem</asp:Label></legend>
                                        <table style="width: 100%; height: 175px" cellpadding="0" cellspacing="0" border="0">
                                            <tr>
                                                <td style="width: 10%;" align="center">Código</td>
                                                <td style="width: 20%;" colspan="2"><asp:TextBox ID="txtCodigo2" runat="server" Enabled="false" Width="90%"></asp:TextBox><input id="hdnCodigo2" type="hidden" runat="server" /></td>
                                                <td style="width: 10%;">&nbsp;</td>
                                                <td style="width: 30%;">&nbsp;</td>
                                                <td style="width: 10%;">&nbsp;</td>
                                                <td style="width: 20%;" align="center">&nbsp;</td>
                                            </tr>
                                            <tr>
                                                <td style="width: 10%;" align="center">Tipo Mensagem</td>
                                                <td style="width: 20%;" colspan="2"><asp:TextBox runat="server" ID="txtDescricaoTipo2" Width="70%"></asp:TextBox></td>
                                                <td style="width: 10%;" align="center">Status Mensagem</td>
                                                <td style="width: 30%;">&nbsp;<asp:TextBox runat="server" ID="txtDescricaoStatus2" Width="50%"></asp:TextBox></td>
                                                <td style="width: 10%;">Status Tradução</td>
                                                <td style="width: 20%;" align="center"><asp:TextBox runat="server" ID="txtStatusTraducao2" Width="95%"></asp:TextBox></td>
                                            </tr>
                                            <tr>
                                                <td style="width: 10%;" align="center">Módulo</td>
                                                <td style="width: 10%;" colspan="2"><asp:TextBox runat="server" ID="txtModulo2" Width="70%"></asp:TextBox></td>
                                                <td style="width: 10%;">Submódulo</td>
                                                <td style="width: 30%;" align="left">&nbsp;<asp:TextBox ID="txtSubmodulo2" runat="server" Width="50%"></asp:TextBox></td>
                                                <td style="width: 10%;">Idioma</td>
                                                <td style="width: 20%;" align="center"><asp:TextBox runat="server" ID="txtIdioma2" Width="95%"></asp:TextBox></td>
                                            </tr>
                                            <tr>
                                                <td colspan="7" style="width: 20%;" >
                                                    <table cellpadding="0" cellspacing="0" style="width: 100%;">
                                                        <tr>
                                                            <td style="width: 10%;">Resource Key</td>
                                                            <td style="width: 20%;">
                                                                <asp:TextBox ID="txtPrefixoResourceKey2" runat="server" Width="100%" Enabled="false" ></asp:TextBox>
                                                            </td>
                                                            <td style="width: 20%;">
                                                                <asp:TextBox ID="txtResourceKey2" runat="server" Width="100%"></asp:TextBox>
                                                            </td>
                                                            <td style="width: 50%;">&nbsp;</td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 100%;" align="center">
                                    <fieldset>
                                        <legend>Propósito</legend>
                                        <table style="width: 100%;">
                                            <tr align="center">
                                                <!-- alterado (width) de 33 para 10 - esertorio - 200809221244 -->
                                                <td style="width: 10%;">&nbsp;</td>
                                                <!-- alterado (width) de 34 para 80 - esertorio - 200809221244 -->
                                                <td style="width: 80%;">
                                                    <!-- alterado (MaxLength) de 255 para 1000 - esertorio - 200809221244 -->
                                                    <!-- alterado (Columns) de 50 para 100 - esertorio - 200809221244 -->
                                                    <asp:TextBox MaxLength="1000" TextMode="MultiLine"  Columns="100" Rows="6" ID="txtProposito2" runat="server"></asp:TextBox>
                                                </td>
                                                <td style="width: 10%;">&nbsp;</td> <!-- alterado (width) de 33 para 10 - esertorio - 200809221244 -->
                                            </tr>
                                        </table>
                                    </fieldset>
                                </td>               
                            </tr>
                            <tr>
                                <td style="width: 100%;" align="center">
                                    <fieldset>
                                        <legend>Mensagem</legend>
                                        <table style="width: 100%;">
                                            <tr align="center">
                                                <td style="width: 33%;">&nbsp;</td>
                                                <td style="width: 34%;"><asp:TextBox MaxLength="255" TextMode="MultiLine"  Columns="50" Rows="6" ID="txtMensagem2" runat="server"></asp:TextBox></td>
                                                <td style="width: 33%;">&nbsp;</td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                </td>               
                            </tr>
                        </table>
                    </div>
                    <iframe frameborder="0" scrolling="no" style="width: 100%; height: 200px; position: absolute; z-index: 90;" id="iframeDiv" />
                </td>
            </tr>                  
        </table>
        
    </form>
</body>
</html>
